<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="keywords"
	content="delicious thumbnail visual bookmark search" />
<meta name="description"
	content="Thumbnail view of my delicious bookmarks." />
<link href="css/mydelicious.css" rel="stylesheet" type="text/css" />
<title>Delicious 'Latest Bookmarks Viewer'</title>
</head>
<body>
<div class="text"><h1>...Visual Bookmarks</h1>If you are wondering what I consider worthy
information, my bookmarks are a pretty close indicator of that and if
you are tired of seeing links on my website, here is a slightly
different view, thumbnails of my recent bookmarks. I hacked it using the
free(partly) <a style="color: orange;"
	href="http://webthumb.bluga.net/home">Webthumb</a> API. If the images
display "Out of credits", that means I need some money to pay Webthumb to
keep generating thumbnails.</div>
<div class="container"><?php
if (substr_count($_SERVER['HTTP_ACCEPT_ENCODING'], 'gzip'))
ob_start("ob_gzhandler");
else ob_start();

require_once('config.php');
require_once('classes/curlrequest.php');

$requestHandler = new CurlRequest();
$response = $requestHandler->fetchRequest($request);
if ( $response === null )
die('Error in response from delicious.Please try again sometime later');

require_once('classes/thumbnail.php');
$doc = new DOMDocument();
$doc->loadXML($response);
$arr = $doc->getElementsByTagName('item');
$count = 0;
foreach($arr as $item){
	$title = $item->getElementsByTagName('title')->item(0)->nodeValue;
	$link = $item->getElementsByTagName('link')->item(0)->nodeValue;
	$thumb = new thumbnail($link,$title);
	$thumbblock = $thumb->getthumbblock();
	$count = $count + 1;
	if ( $count%$thumbsPerRow == 1 )
	echo '<div style="clear:left;margin:10px;">';
	echo $thumbblock;
	if ( $count%$thumbsPerRow == 0 )
	echo '</div>';
	unset($thumb);
}
unset($doc);
?></div>
</body>
</html>
